package imse.team0.transportation;

import javax.xml.bind.annotation.*;
import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: Evgenia
 * Date: 5/1/12
 * Time: 11:06 AM
 * To change this template use File | Settings | File Templates.
 */
@XmlRootElement(name="shipmentRequest")
@XmlAccessorType(XmlAccessType.FIELD)
public class TransportationOrder implements Serializable{
    @XmlAttribute(name="packageVolume", required = true)
    public int loadVolume;
    @XmlElement(name="start-address")
    public String startAddress;
    @XmlElement(name="end-address")
    public String endAddress;
    // shipment request ID is equal to order ID
    @XmlAttribute(name="id", required = true)
    public String shipmentRequestID;

    public TransportationOrder () {

    }

    public TransportationOrder(String _transportationOrderID, int _loadVolume, String _startAddressID,
                               String _endAddressID)
    {
         shipmentRequestID = _transportationOrderID;
         loadVolume =  _loadVolume;
         startAddress = _startAddressID;
         endAddress = _endAddressID;
    }

}
